package com.chenwang.measure.ui.adapter;

import android.support.annotation.Nullable;
import android.widget.ImageView;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.chenwang.measure.R;
import com.chenwang.measure.model.bean.MainBean;
import com.chenwang.measure.model.bean.ServerBean;

import java.util.List;

/**
 * @松 on 2019/7/18 09:50
 *
 */
public class ServerAdapter extends BaseQuickAdapter <ServerBean,BaseViewHolder>{
    public ServerAdapter(@Nullable List<ServerBean> data) {
        super(R.layout.item_server, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, ServerBean item) {
        helper.setText(R.id.tv_name,item.getName() );
        helper.setText(R.id.tv_ip, item.getIp()+":"+item.getPort());
        helper.setText(R.id.tv_user,item.getUser() );
    }
}
